package sctu.edu.java.year2016.team07.liaohengju.day20160521.chapter4_2;

/**
 * Created by hengju on 2016/5/22.程序，使用for循环打印菱形。
 * 编写java
 */
public class Zuoye4_2 {
    public static void main(String[] args){
        int i,j,k;
        for(i=0;i<=3;i++)
        {
            for(j=0;j<=2-i;j++)
                System.out.print(" ");
            for(k=0;k<=2*i;k++)
                System.out.print("*");
            System.out.println();
        }
        for(i=0;i<=2;i++)
        {
            for(j=0;j<=i;j++)
                System.out.print(" ");
            for(k=0;k<=4-2*i;k++)
                System.out.print("*");
            System.out.println();
        }
    }

}


